#include <iostream>
#include <vector>
using namespace std;

int dfs(vector<vector<int>> &gh, vector<int> &vis, int u, int v)
{
        if(u == v){
                return 1;
        }
        vis[u] = 1;
        for(auto w : gh[u]){
                if(!vis[w]){
                        if(dfs(gh, vis, w, v)){
                                return 1;
                        }
                }
        }
        return 0;
}

int main()
{
        int n, m, k;
        cin >> n  >> m >> k;
        vector<vector<int>> gh(n + 1);
        for(int i = 0; i < m; i++){
                int u, v;
                cin >> u >> v;
                gh[u].push_back(v);
        }
        
        vector<int> vis(n + 1, 0);
        for(int i = 0; i < k; i++){
                int u, v;
                cin >> u >> v;
                fill(vis.begin(), vis.end(), 0);
                if(dfs(gh, vis, u, v)){
                        cout<<"Yes"<<endl;
                }else{
                        cout<<"No"<<endl;
                }
        }
        return 0;
}